﻿<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>efwcontroller</Title>
      <Author>kakake</Author>
      <Description>界面控制器的代码片段</Description>
      <HelpUrl></HelpUrl>
      <SnippetTypes />
      <Keywords />
      <Shortcut>efwcontroller</Shortcut>
    </Header>
    <Snippet>
      <References />
      <Imports>
        <Import>
          <Namespace>EFWCoreLib.WcfFrame.ClientController</Namespace>
        </Import>
        <Import>
          <Namespace>EFWCoreLib.CoreFrame.Business.AttributeInfo</Namespace>
        </Import>
        <Import>
          <Namespace>EFWCoreLib.WcfFrame.DataSerialize</Namespace>
        </Import>
      </Imports>
      <Declarations />
      <Code Language="csharp" Kind="" Delimiter="$"><![CDATA[[WinformController(DefaultViewName = "frmBookManager",Memo ="基于efwplus框架增删改查示例")]//在菜单上显示
[WinformView(Name = "frmBookManager", DllName = "Books.Winform.dll", ViewTypeName = "Books.Winform.ViewForm.frmBookManager")]//控制器关联的界面
public class BookDemoController:WcfClientController
	{
		IfrmBookManager _ifrmbookmanager;
        public override void Init()
        {
            _ifrmbookmanager = (IfrmBookManager)DefaultView;
        }
	   //保存
        [WinformMethod]
        public void SaveBook()
        {
            Action<ClientRequestData> requestAction = ((ClientRequestData request) =>
            {
                request.AddData(_ifrmbookmanager.currBook);
            });

            InvokeWcfService("Books.Service", "BookDemoService", "SaveBook", requestAction);
            GetBooks();
        }
		$selected$$end$
	}]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>